import { ApiProperty } from '@nestjs/swagger'
import { IsNotEmpty } from 'class-validator'

export class CreateUserDto {
  readonly id: number

  @ApiProperty({ description: '用户名' })
  @IsNotEmpty({ message: '用户名不能为空' })
  readonly username: string

  @IsNotEmpty({ message: '昵称不能为空' })
  @ApiProperty({ description: '昵称' })
  readonly nickname: string

  @IsNotEmpty({ message: '密码不能为空' })
  @ApiProperty({ description: '密码' })
  readonly password: string

  @ApiProperty({ description: '头像', required: false })
  readonly avatar: string

  readonly role: string

  readonly createTime: Date

  readonly updateTime: Date
}
